<template>
	<view class="brokerbar">
		<view class="broker">
			<view class="logo u-m-r-10">
				<up-avatar :src="house?.broker?.avatar??ee.account.logo" shape="square"></up-avatar>
				 
			</view>
			<view class="name">
				<u-text :text="(house?.broker?.nickname!='')?house?.broker?.nickname:ee.account.name" :bold="true" lines="1"></u-text>
				<u-text color="#999" size="11" text="欢迎预约看房"></u-text>
			</view>
		</view>
		<view class="action">
			<view class="u-m-r-10">
				<navigator :url="'/pages/tallk/tallk?toopenid='+ house?.broker?.openid+'&hid='+house?.id">
				<u-button text="在线沟通"  customStyle="borderColor:#2E9EEE; color:#2E9EEE; fontWeight:bold"></u-button>
				</navigator>
			</view>
			<view>
				<u-button text="电话咨询" @click="callPhone"
				customStyle=" fontWeight:bold"
				color="linear-gradient(to right,#2E9EEE, #2177C7)"></u-button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"kb-broker-bar",
		props:{
			house: undefined,
		},
		data() {
			return {
				
			};
		},
		methods:{
			callPhone(){
				this.ee.callPhone(this.house.broker.mobile)
			}
		}
	}
</script>

<style lang="scss">
	.brokerbar{
		display: flex;
		width: 100%;
		height: 50px;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		vertical-align: middle;
		position: fixed;
		left: 0;
		bottom: 0;
		background: #fff;
		z-index: 999;
		border-top: 1px solid #dadada;
		
		.broker{
			display: flex;
			margin-left: 20px;
			align-items: center;
			vertical-align: middle;
		}	
		.action{
			display: flex;
			margin-right: 10px;
			align-items: center;
			vertical-align: middle;
		}
	}

</style>